<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>

<f:subview id="signon">
<h:panelGrid columns="1" border="0">
  <h:outputText value="Sign In" styleClass="title"/>
  <h:outputText value="Are you a returning customer?" styleClass="subTitle"/>
</h:panelGrid>
<h:panelGrid columns="2" styleClass="standard" columnClasses="signon">
  <h:form id="signonForm">
  <h:panelGrid columns="1" styleClass="standard centerAlign" cellpadding="5">
    <h:outputText value="Yes" styleClass="subTitle"/>
    <h:panelGrid columns="2" columnClasses="rightAlign">
      <h:outputText value="User Name:"/>
      <h:inputText value="#{accountBean.account.username}" id="username" size="15" required="true"/>
    </h:panelGrid>
    <h:message styleClass="errorMessage" for="username"/>
    <h:panelGrid columns="2" columnClasses="rightAlign">
      <h:outputText value="Password:"/>
      <h:inputSecret value="#{accountBean.account.password}" id="password" size="15" required="true"/>
    </h:panelGrid>
    <h:message styleClass="errorMessage" for="password"/>
    <h:commandButton value="Sign In" action="#{accountBean.signonAction}"/>
    <h:messages globalOnly="true" styleClass="errorMessage"/>  
  </h:panelGrid>
  </h:form>
  <h:form id="createSignonForm">
  <h:panelGrid columns="1" styleClass="standard centerAlign" cellpadding="5">
    <h:outputText value="No. I would like to sign up for an account." styleClass="subTitle"/>
    <h:panelGrid columns="2" columnClasses="rightAlign">
      <h:outputText value="User Name:"/>
      <h:inputText value="#{accountBean.account.username}" id="username2" size="15" required="true"/>
    </h:panelGrid>
    <h:message styleClass="errorMessage" for="username2"/>
    <h:panelGrid columns="2" columnClasses="rightAlign">
      <h:outputText value="Password:"/>
      <h:inputSecret value="#{accountBean.account.password}" id="password2" size="15" required="true"/>
    </h:panelGrid>
    <h:message styleClass="errorMessage" for="password2"/>
    <h:panelGrid columns="2" columnClasses="rightAlign">
      <h:outputText value="Password(Repeat):"/>
      <h:inputSecret value="#{accountBean.repeatPassword}" id="repeatPassword" size="15" required="true"/>
    </h:panelGrid>
    <h:message styleClass="errorMessage" for="repeatPassword"/>  
    <h:commandButton value="Create New Account" action="#{accountBean.createSignonAction}"/>
  </h:panelGrid>
  </h:form>
</h:panelGrid>
</f:subview>